#!/usr/bin/python
# Copyright 2011, Kitware, Inc.
# http://mlabwrap.sourceforge.net/
''' Examples for calling matlab functions from Python'''

from mlabwrap import mlab; from numpy import *

def main():
    '''Calling Matlab's surf() command'''
    xx = arange(-2*pi, 2*pi, 0.2) #Define range of inputs
    mlab.surf(subtract.outer(sin(xx),cos(xx))) #call matlab's surf() function

    '''Calling Matlab's Singular Value Decomposition svd() command'''
    U, S, V = mlab.svd([[1,2],[1,3]], nout=3)
